package com.zhb.sys.shiro.function.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zhb.sys.shiro.model.Function;
import com.zhb.sys.shiro.mapper.FunctionMapper;
import com.zhb.sys.shiro.function.service.FunctionService;
/**
 * Function服务实现。
 * 
 * @author zhb
 *
 */
@Service
public class FunctionServiceImpl implements FunctionService{

	@Autowired
	private FunctionMapper functionMapper;
	@Override
	public List<Function> selectFunctionByCondition(Function function) {
		return functionMapper.selectFunctionByCondition(function);
	}
	@Override
	public int insert(Function function) {
		return functionMapper.insertSelective(function);
	}
	@Override
	public Function selectFunctionById(String id) {
		return functionMapper.selectByPrimaryKey(id);
	}
	@Override
	public int update(Function function) {
		return functionMapper.updateByPrimaryKeySelective(function);
	}
	@Override
	public int delete(String id) {
		return functionMapper.deleteByPrimaryKey(id);
	}

}